Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update default behavior of uncontrolled table to only update page on rows change if the user is outside of the page bounds #1201

Merged
merged 1 commit into from
Oct 19, 2023

Conversation

gregbaroni
Copy link
Contributor

@gregbaroni gregbaroni commented Oct 18, 2023

  • Rather than having a prop for if the page should be reset when the rows change, the default behavior will be to only update the page if the user is out of bounds when the rows change
  • This also fixes a bug with the resetPageOnRowChange prop where, if this was false and the user was on the last page, then it would be possible for the user. to be outside of the page bounds if rows were removed

@gregbaroni gregbaroni force-pushed the snoop-fix-reset-page-on-row-change-bug branch 2 times, most recently from a1ba81c to fd6d753 Compare October 18, 2023 21:13
@gregbaroni gregbaroni changed the title Fix page being able to go out of bounds when resetPageOnRowChange is false Update default behavior of uncontrolled table to only update page on rows change if the user is outside of the page bounds Oct 18, 2023
…is out of bounds

- Rather than having a prop for if the page should
be reset when the rows change, the default behavior
will be to only update the page if the user is
out of bounds when the rows change
- This also fixes a bug with the resetPageOnRowChange
prop where, if this was false and the user was on
the last page, then it would be possible for the user
to be outside of the page bounds if rows were removed
@gregbaroni gregbaroni force-pushed the snoop-fix-reset-page-on-row-change-bug branch from fd6d753 to aee28d0 Compare October 18, 2023 21:20
@github-actions
Copy link
Contributor

Released prerelease version 8.7.1-snoop-fix-reset-page-on-row-change-bug-f8311ba.0.
You may now run npm install @appfolio/react-gears@snoop-fix-reset-page-on-row-change-bug

@gregbaroni gregbaroni marked this pull request as ready for review October 18, 2023 21:26
@gregbaroni gregbaroni merged commit 060a3fb into master Oct 19, 2023
2 checks passed
@gregbaroni gregbaroni deleted the snoop-fix-reset-page-on-row-change-bug branch October 19, 2023 16:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants